.TH std::chrono::weekday_last::ok 3 "2024.06.10" "http://cppreference.com" "C++ Standard Libary"
.SH NAME
std::chrono::weekday_last::ok \- std::chrono::weekday_last::ok

.SH Synopsis
   constexpr bool ok() const noexcept;  \fI(since C++20)\fP

   Checks if the weekday object stored in *this is valid.

.SH Return value

   weekday().ok()

.SH Example


// Run this code

 #include <chrono>
 #include <iostream>

 int main()
 {
     std::cout << std::boolalpha;

     auto wdl{std::chrono::Tuesday[std::chrono::last]};
     std::cout << (wdl.ok()) << ' ';

     wdl = {std::chrono::weekday(42)[std::chrono::last]};
     std::cout << (wdl.ok()) << '\\n';
 }

.SH Output:

 true false
